package com.tencreat.service.account;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tencreat.common.core.HttpResult;
import com.tencreat.common.core.domain.entity.SysUser;
import com.tencreat.common.core.domain.model.ReqIdParam;
import com.tencreat.common.core.domain.model.ReqIdsParam;
import com.tencreat.domain.account.MallStore;
import com.tencreat.domain.account.MallSupplier;
import com.tencreat.domain.account.dto.MallStoreDTO;
import com.tencreat.domain.account.dto.MallSupplierDTO;
import com.tencreat.domain.account.dto.MallSupplierRequDTO;
import com.tencreat.domain.account.vo.MallStoreRespVo;
import com.tencreat.domain.account.vo.MallStoreStaticsVo;
import com.tencreat.domain.account.vo.MallSupplierRespVo;
import com.tencreat.domain.account.vo.MallSupplierStaticsVo;
import com.tencreat.domain.mall.dto.MallGoodsSearchDTO;
import com.tencreat.domain.mall.dto.MallStoreAuditDTO;
import com.tencreat.domain.mall.dto.MallSupplierAuditDTO;
import com.tencreat.domain.mall.vo.MallGoodsDetailsVO;
import com.tencreat.domain.mall.vo.MallGoodsListVO;
import com.tencreat.domain.mall.vo.MallStoreGoodsVO;
import com.tencreat.domain.mall.vo.MallStoreScanInfoVO;

import java.util.List;

/**
 * 店铺Service接口
 *
 * @author tencreat
 * @date 2021-08-13
 */
public interface IMallStoreService extends IService<MallStore> {
    /**
     * 查询店铺
     *
     * @param id 店铺ID
     * @return 店铺
     */
    public MallStore selectMallStoreById(ReqIdParam id);

    /**
     * 查询店铺
     *
     * @param id 店铺ID
     * @return 店铺
     */
    public MallStore selectMallStoreById(Long id);


    /**
     * 查询店铺列表
     *
     * @param mallStore 店铺
     * @return 店铺集合
     */
    public List<MallStore> selectMallStoreList(MallStore mallStore);

    /**
     * 新增店铺
     *
     * @param mallStoreVO 店铺
     * @return 结果
     */
    public HttpResult<String> insertMallStore(MallStoreDTO mallStoreVO);

    /**
     * 审核店铺
     *
     * @param id     店铺ID
     * @param passed 是否审核通过
     * @return 结果
     */
    public HttpResult<String> auditMallStore(ReqIdParam id, Boolean passed);

    /**
     * 重置登录密码
     */
    HttpResult<Boolean> password(MallSupplierRequDTO mallStore);

    /**
     * 修改店铺
     *
     * @param mallStore 店铺
     * @return 结果
     */
    public HttpResult<String> updateMallStore(MallStore mallStore);

    /**
     * 批量删除用户
     *
     * @param ids 需要删除的用户ID
     * @return 结果
     */
    public int deleteMallStoreByIds(ReqIdsParam ids);

    /**
     * 删除用户信息
     *
     * @param id 用户ID
     * @return 结果
     */
    public int deleteMallStoreById(ReqIdParam id);

    /**
     * 店铺审核
     *
     * @param dto 入参
     */
    void audit(MallStoreAuditDTO dto);

    /**
     * 生成用户唯一UUID
     *
     * @return 用户唯一ID
     */
    int generateUUID();

    MallStoreStaticsVo storeStatics();

    IPage<MallStoreRespVo> queryAll(Page<MallStore> page, MallStore mallStore);


    /**
     * 描述信息  查询商家  用户扫码返回的商家信息
     *
     * @Author yaoruiqi
     * @Date: 2023/10/11 09:57
     */
    MallStoreScanInfoVO selectScanMallStoreById(Long id);

    /**
     * 描述信息  根据商户id查找商户电手机号
     *
     * @Author yaoruiqi
     * @Date: 2023/10/13 10:00
     */
    HttpResult<String> getMobileById(Long id);

    /**
     * 描述信息  查询店铺
     *
     * @Author yaoruiqi
     * @Date: 2023/10/17 06:30
     */
//	IPage<MallGoodsListVO> apiStoreList(MallGoodsSearchDTO mallGoodsSearchPo,Page<MallStore> mallGoodsIPage );
    IPage<MallGoodsListVO> apiStoreList(IPage<MallStore> mallGoodsIPage, MallGoodsSearchDTO mallGoodsSearchPo);

    /**
     * 分页查询
     *
     * @param iPage     分页参数
     * @param mallStore 查询条件
     * @return 分页结果
     */
    IPage<MallGoodsListVO> page(IPage<?> iPage, MallGoodsSearchDTO mallStore);

    Long selectStoreApprovalStatus(Long uuid);

    List<MallGoodsListVO> storeListTwo(ReqIdParam idParam);

    MallGoodsDetailsVO storeInfo(ReqIdParam idParam);


    List<MallStore> selectStoreByName(String storeName);

    MallStore selectUserById(Long userId);

    HttpResult<MallStoreGoodsVO> category(Long userId);

    SysUser insertSysUser(MallStore mallStore, String pass);
}
